Motion detection is used in many applications, such as security cameras and motion compensation temporal filtering. For conventional motion compensation temporal filtering, a filter locally decides how to combine one or more previous reference frames with a target frame. Weighted averages of the frames are subsequently combined to reduce noise while limiting filtering artifacts. Use of the reference frames is stronger where the filter determines that no local motion is present.
A problem with conventional motion detection is false detected motion when all or part of the frames change in luminance from frame to frame. The motion detection may signal movement where none is present. A problem with conventional temporal filter blending occurs where the target frame is strongly blended with the reference frames while the lighting changes. The resulting filtered picture does not fully reflect the lighting condition of the target frame. For example, if areas that do not have a shadow in the reference frames are blended with an area in the target frame covered by the shadow, the darkening effect of the shadow will be attenuated in the filtered picture.
It would be desirable to implement a lighting correction for motion detection and temporal filtering.